package captcha

import (
	"github.com/dchest/captcha"
	"github.com/gogf/gf/net/ghttp"
)

func GetCaptcha() string {
	d := struct {
		CaptchaId string
	}{
		captcha.New(),
	}

	return d.CaptchaId
}

func ShowCaptcha(w *ghttp.ResponseWriter,r ghttp.Request)  {
	captcha.Server(160, 80).ServeHTTP(w,r.Request)
}